home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / rexx / smacros.lha / FWMacros / AutoSave.arexx next >
Text File  |  1994-12-17  |  2KB  |  64 lines

  1. /* AutoSave
  2. A Macro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 80918.
  3. © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away free to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, downloading, shipping, or handling, without express written 
  7. permission from the author listed above.  Any person or company who violates the 
  8. content of the previous sentence, agrees to pay Steven R. Giovenella $1,000 (US) for 
  9. each copy of this macro sold.  This macro may NOT be added to any disk which is to 
  10. be sold for any price or fee, to include shipping and handling.  The ONLY way this 
  11. macro may be distributed is on a disk which is given away 100% free of all charges, 
  12. or on via telecommunications networks which do not charge any additional fee as a 
  13. result of a user downloading this particular macro.  This macro may only be 
  14. reproduced in its entirety, including all comment lines and code.  The individual 
  15. user may alter this macro for personal use, but may not then distribute the macro 
  16. in any modified form.  If you wish, feel free to send me some cash, a Christmas card, 
  17. some other piece of software, or absolutely nothing as a gift for creating this macro.  
  18. The author of this software is not responsible for any data loss or damage to 
  19. computer equipment as a result, direct or indirect, of the use of this macro. */
  20.  
  21. Options Results
  22.  
  23. /* Ask how often to Save, default to 5 minutes*/
  24. s=5
  25.     ShowMessage 1 0 '"Save every..." "" "" "    10 mins    " "    5 mins    " "   
  26. Other     "'
  27.         IF Result = 1 THEN s = 10
  28.         IF Result = 2 THEN s = 5
  29.         IF Result = 3 THEN DO
  30.             RequestText '"AutoSave" "Enter save time in minutes..." "15"'
  31.                 s=Result
  32.             END
  33. savesecs=s*60
  34.  
  35. /* Save Confirmation Switch */
  36.     ShowMessage 1 0 '"Confirm each save?" "" "" "    Yes    " "    No    " ""'
  37.         IF Result = 1 THEN c=1
  38.         IF Result = 2 THEN c=0
  39.  
  40. /* Save Routine */
  41.  
  42. CT=Time(seconds)
  43. ST=CT+savesecs
  44.  
  45. DO FOREVER
  46.     WAIT 10
  47.     CT=Time(seconds)
  48.     IF VAL CT>=VAL ST THEN DO
  49.         ST=CT+savesecs
  50.         skipsave=1
  51.         IF c=1 THEN DO
  52.             ShowMessage 1 0 '"Time to save..." "" "" "    Save    " "    
  53. Skip this save   " "   Quit AutoSave     "'
  54.             IF Result = 1 THEN save
  55.             IF Result = 2 THEN skipsave=0
  56.             IF Result = 3 THEN Leave
  57.             END
  58.         IF skipsave=1 THEN save
  59.         END
  60.     IF VAL ST>VAL 86400 THEN ST=0
  61.     END
  62.         ShowMessage 1 0 '"AutoSave Terminating" "" "" "    OK   " "" ""'
  63.  
  64.